let mock: any = [
  {
    id: 1,
    title: 'vue'
  },

  {
    id: 2,
    title: 'angular'
  },

  {
    id: 3,
    title: 'react'
  }
]

export let fetchItem = (id: any) => {
  return new Promise((resolve, reject) => {
    id = parseInt(id)
    let result = mock.find(item => item.id == id);
    resolve(result)
  })
}
